With the development of image processing technologies and popularity of intelligent terminals, a user has an increasingly strong wish of beautifying a portrait picture by using an intelligent terminal.
There are mainly two existing portrait picture deformation methods in the following:
1) A manual method: In this method, a user needs to manually select a size of a brush, and manually adjust a part that the user wishes to modify. Referring to FIG. 1, for example, to thin a face of a portrait, a user selects a suitable diameter for thinning a face, to obtain a face thinning range of a circle shown in FIG. 1, then locate the face thinning range in a to-be-deformed area, and finally, deform the to-be-deformed area. However, in this method, the user needs to perform the operations repeatedly to ensure that the operated face is bilaterally symmetrical and a face thinning effect is good, and requirements on the operating user is high.
2) An intelligent (automatic) method: In this method, a deformation range is automatically determined by using a face recognition algorithm, and then a deformation operation is automatically performed on the determined deformation range according to deformation strength that is selected by a user by using a strength progress bar. Although the user does not need to perform multiple operations in this method, a deformation effect is also not ideal if the selected deformation strength is incorrect. Using an existing automatic face thinning method as an example, assuming that a head portrait of a person before deformation is shown in FIG. 2a, the user drags the strength progress bar to control the deformation strength; assuming that deformation of thinning a face is performed on the head portrait in FIG. 2A by using the strongest deformation strength, an obtained effect drawing is shown in FIG. 2B. It may be seen from FIG. 2B that, the chin becomes smaller with strong deformation strength, but other parts of the face do not change well correspondingly, which causes that facial lines are not continuous enough, and therefore presents a poor effect. This is because in the existing method for automatically deforming a portrait picture, a deformation field is obtained by using one control point, and because the control point is used to deform only pixels in a surrounding area of the control point, when pixels in another area are not deformed correspondingly, lines in the entire deformation field are not continuous enough. The deformation field obtained by using one control point is shown in FIG. 3.
To sum up, when a portrait picture is manually deformed, operations are excessively complex, and when the portrait picture is automatically deformed, the portrait picture is deformed by using only one control point; as a result, lines in the deformed portrait picture are not continuous enough, and an effect is poor.